<template>
	<view class="u-page">
		<view class="bg">
			<view class="u-demo-block">
				<view class="u-demo-block__content">
					<u-row customStyle="margin-top: 82rpx">
						<u-col span="2">
							<view class="demo-layout col_center">
								<image @tap="goBack()" style="width: 15rpx; height: 27rpx;"
									src="../../static/userCar/left_arrow.png"></image>
							</view>
						</u-col>
						<u-col span="8">
							<view class="demo-layout col_center">
								<span style="color: white; font-size: 32rpx;">二手车</span>
							</view>
						</u-col>
						<u-col span="2">
							<view class="demo-layout col_center">
								<image style="width: 34rpx; height: 35rpx;" src="../../static/userCar/function23.png">
								</image>
							</view>
						</u-col>
					</u-row>
				</view>
			</view>
			<view style="margin-top: 60rpx;">
				<view class="u-demo-block" v-for="(listItem,listIndex) in list" :key="listIndex">
					<view class="u-demo-block__content box">
						<view class="album">
							<view class="album__avatar">
								<image :src="listItem.img" mode=""
									style="width: 281rpx;height: 241rpx; border-radius: 20rpx 0rpx 0rpx 20rpx;"></image>
								<image :src="listItem.rank" class="rank"></image>
							</view>
							<view class="album__content">
								<u--text :text="listItem.title1" bold size="28rpx" color="#373737" lineHeight="49rpx"
									margin="20rpx 0 0 0"></u--text>
								<pre>
									<u--text
									:text="listItem.title2"
									margin="20rpx 0 0 0"
									size="24rpx"
									color="#6E6E6E"
									></u--text>
								</pre>
								<u--text :text="listItem.price" margin="20rpx 0 0 0" size="36rpx"
									color="#FF3D4D"></u--text>
								<!--  <u-album :urls="urls2"></u-album> -->
							</view>
						</view>
					</view>
				</view>
			</view>
			<!--底部留白-->
			<div style="height: 30rpx;"></div>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						img: '../../static/userCar/used_car1.png',
						rank: '../../static/userCar/used_car_first.png',
						title1: 'A系 588ku 2017款 2.0T \n运动尊享版四驱',
						title2: '准新车   一成购',
						price: '13.65万'
					},
					{
						img: '../../static/userCar/used_car2.png',
						rank: '../../static/userCar/used_car_second.png',
						title1: 'A系 588ku 2017款 2.0T \n运动尊享版四驱',
						title2: '准新车   一成购',
						price: '13.65万'
					},
					{
						img: '../../static/userCar/used_car3.png',
						rank: '../../static/userCar/used_car_third.png',
						title1: 'A系 588ku 2017款 2.0T \n运动尊享版四驱',
						title2: '准新车   一成购',
						price: '13.65万'
					},
					{
						img: '../../static/userCar/used_car4.png',
						title1: 'A系 588ku 2017款 2.0T \n运动尊享版四驱',
						title2: '准新车   一成购',
						price: '13.65万'
					}, {
						img: '../../static/userCar/used_car1.png',
						title1: 'A系 588ku 2017款 2.0T \n运动尊享版四驱',
						title2: '准新车   一成购',
						price: '13.65万'
					}
				]
			}
		},
			methods: {
				goBack() {

					//保证刷新要跳到上一级页面
					uni.switchTab({
						url: '/pages/shouye/shouye',
					})
				}
			}
	}
</script>

<style lang="scss">
	.bg {
		background-image: url("../../static/userCar/user_car_bg.png");
		width: 100%;
		height: 466rpx;
		border-top: 1px solid #4481EB;
	}

	.col_center {
		margin: auto;
	}

	.box {
		width: 690rpx;
		height: 241rpx;
		background-color: white;
		margin: auto;
		border-radius: 20rpx;
		box-shadow: 0rpx 0rpx 20rpx 0rpx #cee1f3;
		margin-top: 30rpx;
	}

	.rank {
		position: absolute;
		width: 38rpx;
		height: 39rpx;
		margin-top: 0rpx;
		margin-left: -260rpx;
	}

	.album {
		@include flex;
		align-items: flex-start;

		&__avatar {
			// background-color: $u-bg-color;
			// padding: 5px;
			// border-radius: 3px;
		}

		&__content {
			margin-left: 10px;
			flex: 1;

		}
	}
</style>